<?php
/*
 * Created on 2010-9-19
 * @ Author Kevin
 * @ ShangHai
 * 
 */
$this->pageTitle=Yii::app()->name; 
$this->breadcrumbs=array(
	'图书'=>array('/book'),
	'全部评论',
	
);
?>
<div class='span-16' id='book_comment_list'>
<h2 class='green'>
<?=$bookinfo->name?>
<span style='color:black;'>的全部评论</span>
</h2>
<?php
$html = '';
foreach($lists as $key=>$comment){
		$userimg = bu().'/ucenter/data/avatar/000/00/00/0'.$comment->uid.'_avatar_small.jpg';
		if(!file_exists(bp().'/../ucenter/data/avatar/000/00/00/0'.$comment->uid.'_avatar_small.jpg')){
			$userimg = bu().'/ucenter/images/noavatar_small.gif';
		}
			$commententry = UrCommentEntry::model()->find('cid=:cid',array(':cid'=>$comment->id));
			$html .="<div class='comment_left_colum'>".CHtml::image($userimg)."</div><div class='comment_right_colum'>";
			$html .= "<div class='comment_title'>$comment->subject</div>";
			$html .="<div class='comment_author'><span class='bluename'>$comment->username</span>&nbsp;&nbsp;<span style='color:gray'>".date('Y-m-d',$comment->create_datetime)."</span><br/></div>";
			$html .="<div class='comment_content'>$commententry->content</div>";
			$html .="<br/><br/></div>";	
}
echo $html;
?><hr/>
<p class="paging"><?php $this->widget('CLinkPager', array('pages' => $pages)); ?></p> 
</div>
<div class='span-7'><?php
$this->widget('application.components.CollectionList',array('num'=>5));
$this->widget('application.components.CommentList',array('num'=>10));
?></div>
